import urllib3
import json

data = {
    "mobile": "15311484568",
    "password": "123456",
}
encoded_data = json.dumps(data).encode("utf-8")
http_client = urllib3.PoolManager()
response = http_client.request(
    "POST",
    "http://localhost:5000/login_json",
    body=encoded_data,
    headers={
        'content-type': 'application/json;charset=UTF-8'
    }
)
if response.status == 200:
    reponse_text = response.data
    print(reponse_text)
    if len(reponse_text) > 0:
        emp = json.loads(reponse_text)
        for k, v in emp.items():
            print(k, '>>>', v)
